WOPI REST API

您所在的位置:网站首页 onlyoffice api php WOPI REST API

WOPI REST API

2023-04-21 20:32| 来源: 网络整理| 查看: 265

CheckFileInfoCheckFileInfo

GET /wopi/files/(file_id)

Returns information about the file properties, access rights and editor settings.

Parameters

NameDescriptionTypefile_idThe file ID that must be URL safe.string

Query parameters

NameDescriptionTypeaccess_tokenAn access token that the host will use to determine whether the request is authorized.string

Request headers

NameDescriptionTypePresenceX-WOPI-SessionContextSession context if it is provided on the initial WOPI action URL.stringoptional

Required response properties

NameDescriptionTypeExampleBaseFileNameA file name without a path that is displayed in the user interface (UI) and determines the file extension.string“Example File Name.docx”VersionThe current version of the file based on the server file version schema. Every time the document is edited and saved, the version must be changed. The version values must never repeat for a given file.string“Khirz6zTPdfd7”

Breadcrumb properties

NameDescriptionTypeExampleBreadcrumbBrandNameA name that the WOPI client displays to the user to indicate the brand name of the WOPI server.string“Example Brand Name”BreadcrumbBrandUrlURL to a web page that the WOPI client navigates to when the user clicks the UI displaying BreadcrumbBrandName.string“https://example.com/url-to-breadcrumb-brand-page.com“BreadcrumbDocNameA file name that the WOPI client displays to the user. If this parameter is not specified, then the BaseFileName parameter is used.string“Example Breadcrumb File Name.docx”BreadcrumbFolderNameA name that the WOPI client displays to the user that indicates the name of the folder that contains the file.string“Example Folder Name”BreadcrumbFolderUrlURL to a web page that the WOPI client navigates to when the user clicks the UI displaying BreadcrumbFolderName.string“https://example.com/url-to-breadcrumb-brand-folder“

PostMessage properties

NameDescriptionTypeExampleClosePostMessageSpecifies if the WOPI client should notify the WOPI server in case the user closes the rendering or editing client currently using this file. The host expects to receive the UI_Close PostMessage when the Close UI in the online office is activated.booleantrueEditModePostMessageSpecifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the UI_Edit PostMessage when the Edit UI in the online office is activated.booleantrueEditNotificationPostMessageSpecifies if the WOPI client should notify the WOPI server in case the user tries to edit a file. The host expects to receive the Edit_Notification PostMessage.booleantrueFileSharingPostMessageSpecifies if the WOPI client should notify the WOPI server in case the user tries to share a file. The host expects to receive the UI_Sharing PostMessage when the Share UI in the online office is activated.booleantrueFileVersionPostMessageSpecifies if the WOPI client will notify the WOPI server in case the user tries to navigate to the previous file version. The host expects to receive the UI_FileVersions PostMessage when the Previous Versions UI in the online office is activated.booleantruePostMessageOriginA domain that the WOPI client must use as the targetOrigin parameter when sending messages as described in [W3C-HTML5WEBMSG].string“https://exampledomain.com“

File URL properties

NameDescriptionTypeExampleCloseUrlURL to a web page that the implementer deems useful to the user in case the user closes the rendering or editing client currently using this file.string“https://example.com/url-to-close-page.com“FileSharingUrlURL to the location that allows the user to share a file.string“https://example.com/url-to-sharing-page.com“FileVersionUrlURL to the location that allows the user to view the previous file version.string“https://example.com/url-to-previous-version-page.com“HostEditUrlURL to a web page where a file can be edited using the WOPI client.string“https://example.com/url-to-host-page.com“

Other miscellaneous properties

NameDescriptionTypeExampleCopyPasteRestrictionsSpecifies if the WOPI client must disable the Copy and Paste functionality within the application. By default, all Copy and Paste functionality is enabled, i.e. the setting has no effect. Possible property values:BlockAll - the Copy and Paste functionality is completely disabled within the application;CurrentDocumentOnly - the Copy and Paste functionality is enabled but content can only be copied and pasted within the file currently open in the application.string“BlockAll”DisablePrintSpecifies if the WOPI client must disable any print functionality under its control.booleantrueFileExtensionA file extension which must begin with a “.”.string“.docx”FileNameMaxLengthThe maximum length of a file name, including the file extension, supported by the WOPI server.integer20LastModifiedTimeThe last time when the file was modified. This time must always be a UTC time, and must be formatted in ISO 8601 round-trip format. This property can be specified as an alternative to the Version property.string“2009-06-15T13:45:30.0000000Z”

User metadata properties

NameDescriptionTypeExampleIsAnonymousUserSpecifies if the user is anonymous.booleantrueUserFriendlyNameA user name. If it is undefined, the WOPI client may be configured to use a placeholder string in some scenarios, or to show no name at all.string“John Smith”UserIdA unique user identifier that is specified by the WOPI server.string“uid-1”

User permissions properties

NameDescriptionTypeExampleReadOnlySpecifies if a file cannot be changed by the current user.booleantrueUserCanNotWriteRelativeSpecifies if the user has permissions to create new files on the WOPI server or not. The true value means that the PutRelativeFile execution will fail for this user on the current file. By default, this parameter is false and the PutRelativeFile operation is executed.booleanfalseUserCanRenameSpecifies if the user has permissions to rename a file.booleantrueUserCanReviewSpecifies if the user has permissions to review a file.booleantrueUserCanWriteSpecifies if the user has permissions to edit a file.booleantrue

WOPI host capabilities properties

NameDescriptionTypeExampleSupportsLocksSpecifies if the WOPI server supports the Lock, Unlock, and RefreshLock operations.booleantrueSupportsRenameSpecifies if the WOPI server supports the renaming permission.booleantrueSupportsReviewingSpecifies if the WOPI server supports the review permission.booleantrueSupportsUpdateSpecifies if the WOPI server supports the PutFile and PutRelativeFile operations.booleantrue

Nextcloud/Collabora/Seafile properties

NameDescriptionTypeExampleEnableInsertRemoteImageSpecifies whether to enable the menu entry and toolbar item which call the UI_InsertGraphic message. This property is used to display a user interface element (for example, a dialog) allowing the user to pick an image from the integration. The integration is supposed to provide a temporary URL that may be downloaded once, and return it back via the Action_InsertGraphic message with Values set to the temporary URL.booleantrueHidePrintOptionSpecifies if the WOPI server hides the print option from the file menu bar in the UI.booleanfalse


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3